const app = getApp();
const accountInfo = wx.getAccountInfoSync();
//版本信息
const envVersion = accountInfo.miniProgram.envVersion;
const devMenuData = [
  {
    title: "质量隐患管理",
    children: [{
        title: '隐患提报',
        name: 'tissueRisk-add',
        package: "pages",
        icon: 't-icon-edit'
      },
      {
        title: '质量隐患',
        name: 'tissueRisk-list',
        color: 'red',
        package: "pages",
        icon: 't-icon-anquan'
      },
    ]
  },
]
const prodMenuData = [
  {
    title: "质量隐患管理",
    children: [
      {
        title: '隐患提报',
        name: 'tissueRisk-add',
        package: "pages",
        icon: 't-icon-edit'
      },
      {
        title: '质量隐患',
        name: 'tissueRisk-list',
        color: 'red',
        package: "pages",
        icon: 't-icon-anquan'
      },
    ]
  },
]
Page({
  options: {
    addGlobalClass: true,
  },
  data: {
    menuData: envVersion === 'release' ? prodMenuData : devMenuData
  },

  onShow() {
    //校验登录状态
    app.checkAuth()
  },


  gotoYhTb() {
    wx.navigateTo({
      url: '/pages/tissueRisk-add/tissueRisk-add',
    })
  }
})